
function ValidateForm(form){
		
		if(form.txtFName.value == "" || form.txtFName.value == null){
			alert("Please enter your first name");
			form.txtFName.focus();
			return false;
		}
		
		if(form.txtLName.value == "" || form.txtLName.value == null){
			alert("Please enter your last name");
			form.txtLName.focus();
			return false;
		}
		
		if(form.txtOrganization.value == "" || form.txtOrganization.value == null){
			alert("Please enter Organization");
			form.txtOrganization.focus();
			return false;
		}
		
		if(form.txtZipcode.value == "" || form.txtZipcode.value == null){
			alert("Please enter zipcode");
			form.txtZipcode.focus();
			return false;
		}
		
		
		if(form.txtEmail.value == "" || form.txtEmail.value == null){
			alert("Please enter your Email");
			form.txtEmail.focus();
			return false;
		}
		
		if(form.Conference_list.selectedIndex == 0)
		{
			alert('Please select the conference you wish to attend');
			return false;
		}
		var zipcode = form.txtZipcode.value;
		if(!validateZipCode(zipcode)){
			form.txtZipcode.focus();
			return false;
		}
		
		var emailId = form.txtEmail.value;
	if(!validateEmail(emailId))
	{
		form.txtEmail.focus();
		return false;
	}
	
	if((form.confDays[0].checked == false) && (form.confDays[1].checked == false))
	{
		alert('Please select the days on which you will be attending the conference');
		
		return false;
	}
	
	if((form.confDays[1].checked == true && form.popupDatepicker2.value == ""))
	{
		alert('Select the date on which you will be attending the conference');
		form.popupDatepicker2.focus();
		return false;
	}
	
	if((form.confDays[1].checked == false && form.popupDatepicker2.value !=""))
	{
		alert('Select the date if you are attending the conference only for a Day');
		return false;
	}
				
		return true;
		
	};
	
	function validateEmail(value)
	{
		var reg = /^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
		var result = value.match(reg);
		if(result)
			return true;
		else
			alert("You have entered an invalid Email Id");
		return false;
	}
	
	function validateZipCode(value)
	{
		var reZip = new  RegExp(/(^\d{5}$)|(^\d{5}-\d{4}$)/);
		var result = value.match(reZip);
		if(result)
			return true;
		else
			alert("You have entered an invalid zipcode");
		return false;
	}

	

window.onload = function(){
		
};
	
